300 |
How can I change the font for entire item
|
299 |
How do I vertically align a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:DrawGridLines := -2/*exRowLines*/ oComboBox:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.) oComboBox:Columns():Add("VAlign") oItems := oComboBox:Items() h := oItems:AddItem("This is a bit of long text that should break the line") oItems:SetProperty("CellCaption",h,1,"top") oItems:SetProperty("CellVAlignment",h,1,0/*exTop*/) h := oItems:AddItem("This is a bit of long text that should break the line") oItems:SetProperty("CellCaption",h,1,"middle") oItems:SetProperty("CellVAlignment",h,1,1/*exMiddle*/) h := oItems:AddItem("This is a bit of long text that should break the line") oItems:SetProperty("CellCaption",h,1,"bottom") oItems:SetProperty("CellVAlignment",h,1,2/*exBottom*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
298 |
How can I change the position of an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:AddItem("Item 1") oItems:AddItem("Item 2") oItems:SetProperty("ItemPosition",oItems:AddItem("Item 3"),0) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
297 |
How do I find an item based on a path
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234) oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:FindPath("Root 1\Child 1"),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
296 |
How do I find an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:FindItem("Child 2",0),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
295 |
How can I insert a hyperlink or an anchor element
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Column") oItems := oComboBox:Items() oItems:SetProperty("CellCaptionFormat",oItems:AddItem("Just an <a1>anchor</a> element ..."),0,1/*exHTML*/) oItems1 := oComboBox:Items() oItems1:SetProperty("CellCaptionFormat",oItems1:AddItem("Just another <a2>anchor</a> element ..."),0,1/*exHTML*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
294 |
How do I find the index of the item based on its handle
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemByIndex(oItems:ItemToIndex(h)),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
293 |
How do I find the handle of the item based on its index
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemByIndex(1),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
292 |
How can I find the cell being clicked in a radio group
|
291 |
Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:LinesAtRoot := -1/*exLinesAtRoot*/ oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemHasChildren",oItems:AddItem("parent item with no child items"),.T.) oItems:AddItem("next item") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
290 |
Can I let the user to resize at runtime the specified item
|
289 |
How can I change the size ( width, height ) of the picture
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:SetProperty("CellPicture",h,0,oComboBox:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")) oItems:SetProperty("CellPictureWidth",h,0,24) oItems:SetProperty("CellPictureHeight",h,0,24) oItems:SetProperty("ItemHeight",h,32) h := oItems:AddItem("Root 2") oItems:SetProperty("CellPicture",h,0,oComboBox:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")) oItems:SetProperty("ItemHeight",h,48) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
288 |
How do I unselect an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("SelectItem",h,.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
287 |
How do I find the selected item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("SelectItem",h,.T.) oItems:SetProperty("ItemBold",oItems:SelectedItem(0),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
286 |
How do I select an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("SelectItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
285 |
Can I display a button with some picture or icon inside
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif") oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1," Button <img>p1</img> ") oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/) oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/) oItems:SetProperty("CellHasButton",h,1,.T.) oItems:SetProperty("ItemHeight",h,48) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
284 |
Can I display a button with some picture or icon inside
|
283 |
Can I display a button with some icon inside
|
282 |
How can I assign multiple icon/picture to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif") oComboBox:SetProperty("HTMLPicture","p2","c:\exontrol\images\auction.gif") oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("text <img>p1</img> another picture <img>p2</img> and so on") oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/) oItems:SetProperty("CellPicture",h,0,oComboBox:ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)")) oItems:SetProperty("ItemHeight",h,48) oItems:AddItem("Root 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
281 |
How can I assign an icon/picture to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:SetProperty("CellPicture",h,0,oComboBox:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")) oItems:SetProperty("ItemHeight",h,48) oItems:AddItem("Root 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
280 |
How can I assign multiple icons/pictures to a cell
|
279 |
How can I assign multiple icons/pictures to a cell
|
278 |
How can I assign an icon/picture to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=") oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:SetProperty("CellImage",h,0,1) oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 1"),0,2) oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 2"),0,3) oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
277 |
How can I get the handle of an item based on the handle of the cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:CellItem(oItems:ItemCell(h,0)),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
276 |
How can I display a button inside the item or cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1," Button 1 ") oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/) oItems:SetProperty("CellHasButton",h,1,.T.) h := oItems:AddItem("Cell 2") oItems:SetProperty("CellCaption",h,1," Button 2 ") oItems:SetProperty("CellHAlignment",h,1,1/*CenterAlignment*/) oItems:SetProperty("CellHasButton",h,1,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
275 |
How can I change the state of a radio button
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:MarkSearchColumn := .F. oComboBox:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,128 } ) , .F. )) oComboBox:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oComboBox:Columns():Add("C3") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Radio 1") oItems:SetProperty("CellHasRadioButton",h,1,.T.) oItems:SetProperty("CellRadioGroup",h,1,1234) oItems:SetProperty("CellCaption",h,2,"Radio 2") oItems:SetProperty("CellHasRadioButton",h,2,.T.) oItems:SetProperty("CellRadioGroup",h,2,1234) oItems:SetProperty("CellState",h,1,1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
274 |
How can I assign a radio button to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:MarkSearchColumn := .F. oComboBox:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,128 } ) , .F. )) oComboBox:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. )) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oComboBox:Columns():Add("C3") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Radio 1") oItems:SetProperty("CellHasRadioButton",h,1,.T.) oItems:SetProperty("CellRadioGroup",h,1,1234) oItems:SetProperty("CellCaption",h,2,"Radio 2") oItems:SetProperty("CellHasRadioButton",h,2,.T.) oItems:SetProperty("CellRadioGroup",h,2,1234) oItems:SetProperty("CellState",h,1,1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
273 |
How can I change the state of a checkbox
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Check Box") oItems:SetProperty("CellHasCheckBox",h,1,.T.) oItems:SetProperty("CellState",h,1,1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
272 |
How can I assign a checkbox to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Check Box") oItems:SetProperty("CellHasCheckBox",h,1,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
271 |
How can I display an item or a cell on multiple lines
|
270 |
How can I assign a tooltip to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"tooltip") oItems:SetProperty("CellToolTip",h,1,"This is bit of text that's shown when the user hovers the cell") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
269 |
How can I associate an extra data to a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellData",h,1,"your extra data") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
268 |
How do I enable or disable a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellEnabled",h,1,.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
267 |
How do I change the cell's foreground color
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellForeColor",h,1,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
266 |
How do I change the visual effect for the cell, using your EBN files
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellBackColor",h,1,0x1000000) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
265 |
How do I change the cell's background color
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellBackColor",h,1,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
264 |
How do I change the caption or value for a particular cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
263 |
How do I get the handle of the cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("CellBold",,oItems:ItemCell(h,0),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
262 |
How do I retrieve the focused item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:FocusItem(),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
261 |
How do I get the number or count of child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:AddItem(oItems:ChildCount(h)) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
260 |
How do I enumerate the visible items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:SetProperty("ItemBold",oItems:FirstVisibleItem(),.T.) oItems:SetProperty("ItemBold",oItems:NextVisibleItem(oItems:FirstVisibleItem()),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
259 |
How do I enumerate the siblings items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:SetProperty("ItemBold",oItems:NextSiblingItem(oItems:FirstVisibleItem()),.T.) oItems:SetProperty("ItemBold",oItems:PrevSiblingItem(oItems:NextSiblingItem(oItems:FirstVisibleItem())),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
258 |
How do I get the parent item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemParent(oItems:ItemChild(h)),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
257 |
How do I get the first child item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SetProperty("ItemBold",oItems:ItemChild(h),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
256 |
How do I enumerate the root items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ItemBold",oItems:RootItem(0),.T.) oItems:SetProperty("ItemUnderline",oItems:RootItem(1),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
255 |
I have a hierarchy, how can I count the number of root items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root 1") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) h := oItems:AddItem("Root 2") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:AddItem(oItems:RootCount()) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
254 |
How can I make an item unselectable, or not selectable
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Column") oItems := oComboBox:Items() h := oItems:AddItem("unselectable - you can't get selected") oItems:SetProperty("SelectableItem",h,.F.) oItems:AddItem("selectable") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
253 |
How can I hide or show an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Column") oItems := oComboBox:Items() h := oItems:AddItem("hidden") oItems:SetProperty("ItemHeight",h,0) oItems:SetProperty("SelectableItem",h,.F.) oItems:AddItem("visible") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
252 |
How can I change the height for all items
|
251 |
How do I change the height of an item
|
250 |
How do I disable or enable an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("EnableItem",oItems:AddItem("disabled"),.F.) oComboBox:Items():AddItem("enabled") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
249 |
How do I display as strikeout a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellStrikeOut",oItems:AddItem("strikeout"),0,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
248 |
How do I display as strikeout a cell or an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <s>strikeout</s> only a portion of text"),0,1/*exHTML*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
247 |
How do I display as strikeout an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemStrikeOut",oItems:AddItem("strikeout"),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
246 |
How do I underline a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellUnderline",oItems:AddItem("underline"),0,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
245 |
How do I underline a cell or an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <u>underline</u> only a portion of text"),0,1/*exHTML*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
244 |
How do I underline an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemUnderline",oItems:AddItem("underline"),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
243 |
How do I display as italic a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellItalic",oItems:AddItem("italic"),0,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
242 |
How do I display as italic a cell or an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <i>italic</i> only a portion of text"),0,1/*exHTML*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
241 |
How do I display as italic an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemItalic",oItems:AddItem("italic"),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
240 |
How do I bold a cell
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellBold",oItems:AddItem("bold"),0,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
239 |
How do I bold a cell or an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("CellCaptionFormat",oItems:AddItem("gets <b>bold</b> only a portion of text"),0,1/*exHTML*/) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
238 |
How do I bold an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemBold",oItems:AddItem("bold"),.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
237 |
How do I change the foreground color for the item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h,hC oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") hC := oItems:InsertItem(h,,"Child 1") oItems:SetProperty("ItemForeColor",hC,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
236 |
How do I change the visual appearance for the item, using your EBN technology
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h,hC oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn") oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") hC := oItems:InsertItem(h,,"Child 1") oItems:SetProperty("ItemBackColor",hC,0x1000000) oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
235 |
How do I change the background color for the item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h,hC oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") hC := oItems:InsertItem(h,,"Child 1") oItems:SetProperty("ItemBackColor",hC,AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
234 |
How do I expand or collapse an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
233 |
How do I associate an extra data to an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:SetProperty("ItemData",oItems:AddItem("item"),"your extra data") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
232 |
How do I get the number or count of items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems,oItems1 LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems1 := oComboBox:Items() oItems1:AddItem(oItems1:ItemCount()) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
231 |
How can I change at runtime the parent of the item
|
230 |
How can I sort the items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oComboBox:Columns:Item("Default"):SortOrder := 2/*SortDescending*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
229 |
How do I sort the child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("Default") oItems := oComboBox:Items() h := oItems:AddItem("Root") oItems:InsertItem(h,,"Child 1") oItems:InsertItem(h,,"Child 2") oItems:SetProperty("ExpandItem",h,.T.) oItems:SortChildren(h,0,.F.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
228 |
How can I remove or delete all items
|
227 |
How can I remove or delete an item
|
226 |
How can I add or insert child items
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:LinesAtRoot := -1/*exLinesAtRoot*/ oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() h := oItems:AddItem("Cell 1") oItems:SetProperty("CellCaption",h,1,"Cell 2") oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 3"),1,"Cell 4") oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Cell 5"),1,"Cell 6") oItems:SetProperty("ExpandItem",h,.T.) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
225 |
How can I add or insert a child item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:LinesAtRoot := -1/*exLinesAtRoot*/ oComboBox:Columns():Add("Default") oItems := oComboBox:Items() oItems:InsertItem(oItems:AddItem("root"),,"child") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
224 |
How can I add or insert an item
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oItems LOCAL h oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("C1") oComboBox:Columns():Add("C2") oItems := oComboBox:Items() oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2") h := oItems:AddItem("Cell 3") oItems:SetProperty("CellCaption",h,1,"Cell 4") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
223 |
How can I add or insert an item
|
222 |
How can I get the columns as they are shown in the control's sortbar
|
221 |
How can I access the properties of a column
|
220 |
How can I remove all the columns
|
219 |
How can I remove a column
|
218 |
How can I get the number or the count of columns
|
217 |
How can I change the font for all cells in the entire column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oConditionalFormat LOCAL f oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) f := CreateObject("StdFont") f:Name := "Tahoma" f:Size := 12 oConditionalFormat := oComboBox:ConditionalFormats():Add("1") oConditionalFormat:Font := f oConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oComboBox:Columns():Add("Column") oComboBox:Items():AddItem(0) oComboBox:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
216 |
How can I change the background color for all cells in the column
|
215 |
How can I change the foreground color for all cells in the column
|
214 |
How can I show as strikeout all cells in the column
|
213 |
How can I underline all cells in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) var_ConditionalFormat := oComboBox:ConditionalFormats:Add("1") var_ConditionalFormat:Underline := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oComboBox:Columns():Add("Column") oComboBox:Items():AddItem(0) oComboBox:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
212 |
How can I show in italic all data in the column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) var_ConditionalFormat := oComboBox:ConditionalFormats:Add("1") var_ConditionalFormat:Italic := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oComboBox:Columns():Add("Column") oComboBox:Items():AddItem(0) oComboBox:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
211 |
How can I bold the entire column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL var_ConditionalFormat oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) var_ConditionalFormat := oComboBox:ConditionalFormats:Add("1") var_ConditionalFormat:Bold := .T. var_ConditionalFormat:ApplyTo := 0/*exFormatToColumns*/ oComboBox:Columns():Add("Column") oComboBox:Items():AddItem(0) oComboBox:Items():AddItem(1) oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
210 |
How can I display a computed column and highlight some values that are negative or less than a value
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL var_ConditionalFormat LOCAL oItems,oItems1 oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("A") oComboBox:Columns():Add("B") oComboBox:Columns():Add("(A+B)*1.19"):ComputedField := "(%0 + %1) * 1.19" oItems := oComboBox:Items() oItems:SetProperty("CellCaption",oItems:AddItem(1),1,2) oItems1 := oComboBox:Items() oItems1:SetProperty("CellCaption",oItems1:AddItem(10),1,20) var_ConditionalFormat := oComboBox:ConditionalFormats:Add("%2 > 10") var_ConditionalFormat:Bold := .T. var_ConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. )) var_ConditionalFormat:ApplyTo := 2/*0x2+*/ oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
209 |
Can I display a computed column so it displays the VAT, or SUM
|
208 |
How can I show a column that adds values in the cells
|
207 |
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL var_Column oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) var_Column := oComboBox:Columns:Add("Filter") var_Column:FilterOnType := .T. var_Column:DisplayFilterButton := .T. var_Column:AutoSearch := 1/*exContains*/ oComboBox:Items():AddItem("Canada") oComboBox:Items():AddItem("USA") oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
206 |
Is there any function to filter the control's data as I type, something like filter on type
|
205 |
How can I programmatically filter a column
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oColumn := oComboBox:Columns():Add("Filter") oColumn:DisplayFilterButton := .T. oColumn:FilterType := 2/*exNonBlanks*/ oComboBox:Items():AddItem() oComboBox:Items():AddItem("not empty") oComboBox:ApplyFilter() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
204 |
How can I show or display the control's filter
|
203 |
How can I customize the items being displayed in the drop down filter window
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox LOCAL oColumn oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oColumn := oComboBox:Columns():Add("Custom Filter") oColumn:DisplayFilterButton := .T. oColumn:DisplayFilterPattern := .F. oColumn:CustomFilter := "Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.txt|*.log" oColumn:FilterType := 3/*exPattern*/ oColumn:Filter := "*.xls" oComboBox:Items():AddItem("excel.xls") oComboBox:Items():AddItem("word.doc") oComboBox:Items():AddItem("pp.pps") oComboBox:Items():AddItem("text.txt") oComboBox:ApplyFilter() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
202 |
How can I change the order or the position of the columns in the sort bar
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:SortBarVisible := .T. oComboBox:SortBarColumnWidth := 48 oComboBox:Columns():Add("C1"):SortOrder := 1/*SortAscending*/ oComboBox:Columns():Add("C2"):SortOrder := 2/*SortDescending*/ oComboBox:Columns:Item("C2"):SortPosition := 0 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |
201 |
How do I arrange my columns on multiple levels
#include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oComboBox oForm := XbpDialog():new( AppDesktop() ) oForm:drawingArea:clipChildren := .T. oForm:create( ,,{100,100}, {640,480},, .F. ) oForm:close := {|| PostAppEvent( xbeP_Quit )} oComboBox := XbpActiveXControl():new( oForm:drawingArea ) oComboBox:CLSID := "Exontrol.ComboBox.1" /*{CF170E7A-4391-44BD-8D93-29F8D2801EF7}*/ oComboBox:create(,, {10,60},{610,370} ) oComboBox:Columns():Add("S"):Width := 32 oComboBox:Columns():Add("Level 2"):LevelKey := 1 oComboBox:Columns():Add("Level 3"):LevelKey := 1 oComboBox:Columns():Add("Level 4"):LevelKey := 1 oComboBox:Columns():Add("Level 1"):LevelKey := "2" oComboBox:Columns():Add("Level 2"):LevelKey := "2" oComboBox:Columns():Add("Level 3"):LevelKey := "2" oComboBox:Columns():Add("Level 4"):LevelKey := "2" oComboBox:Columns():Add("E"):Width := 32 oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN |